# --^_^-- coding:utf-8 --^_^--
# @Remark:登录页面元素定位
import time

from selenium.webdriver.common.by import By


class LoginPageLocator:
    # 用户名输入框
    user_loc = (By.XPATH, '//input[@placeholder ="请输入用户名"]')
    time.sleep(1)
    # 密码输入框
    pwd_loc = (By.XPATH, '//input[@placeholder ="请输入密码"]')
    pwd_loc1 = (By.XPATH, '//input[@type="password"]')
    # 登录按钮
    login_button_loc = (By.XPATH, '//button[text()="登录"]')
    # 密码错误提示信息
    login_error_loc = (By.XPATH, '//div[@class="cdk-overlay-container"]')
    # <div class ="md2-toast ng-star-inserted"> 账号或密码错误 </div>

    # 登录成功页元素
    home_welcome = (By.XPATH, '//span[text()="温馨提示"]')

    # 学术中心定位
    business_loc = (By.XPATH, '//div[text()=" 学术研究中心 "]/../a/img')
    ar_loc = (By.XPATH, '//div[text()=" 学术研究中心 "]/../a/img')

    # crm
    crm_loc = (By.XPATH, '//div[text()=" CRM平台 "]/../a/img')

    # 知识点名称
    knowledge_points = (By.XPATH, '//input[@name="ion-input-0"]')
    # 课次
    class_times = (By.XPATH, "//input[@placeholder='课次']")

    # 退出登录
    drop_down_loc = (By.XPATH, "//div[@class='flex items-center']")
    logout_loc = (By.XPATH, "//span[contains(.,'退出')]")

    # 班主任工作平台
    ts_loc = (By.XPATH, "//div[text()=' 班主任工作平台 ']/../a/img")
    crm_work_loc = (By.XPATH, '//div[text()=" CRM工作平台 "]/../a/img')
